#include <string>
#include <stdio.h>
#include <stdlib.h>

#include "Student.h"
#include "Student_lib.h"
#include "Student.cpp"

int main(){
	Student temp, List[100], addingList[100];
	int last = 0, n_last = 0, pos = 0, count = 0;
	int i;
	string inp;
    ReadStudent("student.txt",List,last);
	ReadStudent("modify.txt",addingList,n_last);
	for(i = 0; i<n_last; i++)
	{
		pos = Search_by_id(addingList[i].get_id(),List,last);
		if(pos > 0 && FindConjunction(addingList[i],List,last) > 0)
		{
			List[pos] = addingList[i];
			count++;
		}
	}
	WriteOut("student.txt", List, last);
	cout<<"modified "<<count<<" students from "<<n_last<<" entities, "<<n_last-count<<" conjunction and/or non-exist";
}